package dizhu;

public class Demo {

	public static void main(String[] args) {
		PackCards packCards = new PackCards();
		Player p1 = new Player("A");
		Player p2 = new Player("B");
		Player p3 = new Player("C");
		// 输出牌
		System.out.println("这副牌依次为：");
		System.out.println(packCards);
		// 洗牌
		packCards.shuffleCards();
		// 洗牌后输出
		System.out.println("洗牌后依次为：");
		System.out.println(packCards);
		// 抓牌
		for (int i = 0; i < packCards.getCards().size(); i++) {
			if (i < 51) {
				if (i % 3 == 0) {
					p1.addCard(packCards.getCards().get(i));
				}
				if (i % 3 == 1) {
					p2.addCard(packCards.getCards().get(i));
				}
				if (i % 3 == 2) {
					p3.addCard(packCards.getCards().get(i));
				}
				packCards.getCards().remove(i);
			}
		}
		// 抓牌后三个玩家和底牌输出
		// 玩家1的牌：
		System.out.println("抓完牌后三玩家的牌依次为：");
		System.out.println(p1);
		// 玩家2的牌：
		System.out.println(p2);
		// 玩家3的牌：
		System.out.println(p3);
		//底牌为
		System.out.println("抓完牌后底牌为：");
		System.out.println(packCards);
	}

}
